package cn.mesmile.code.support;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zb
 * @date 2021/5/10 10:45
 * @Description
 */
public class TestWrapper {

    public static void main(String[] args) {
        List<Notice> notices = new ArrayList<>();
        for (int i = 0; i < 6 ; i++) {
            Notice notice = new Notice();
            notice.setAuthor("这是作者"+ i);
            notice.setContent("文章内容"+ i);
            notice.setGender(i);
            notices.add(notice);
        }
        // long current, long size, long total
        IPage<Notice> pages = new Page<>(1,2,6);
        pages.setRecords(notices);

        List<NoticeVO> noticeVOS = NoticeWrapper.build().listVO(notices);
        System.out.println("noticeVOS = " + noticeVOS);
        System.out.println("=========================================");
    }

}
